package cn.jbolt.ai.core.chain.config;

import cn.jbolt.util.JSONUtil;
import com.fasterxml.jackson.databind.JsonNode;
import com.jboltai.capability.message.AIIntention;

public class IntentionNodeConfig {


    /**
     * 匹配意图的文本 来源字段
     */
    private String inputField = AppConfigConstant.ATTR_KEY_PROMPT;


    /**
     * 意图匹配结果 存储字段
     */
    private String outputField = AppConfigConstant.ATTR_KEY_INTENTION_RESULT;

    /**
     * 意图定义
     */
    private AIIntention[] intentions;


    public static IntentionNodeConfig from(JsonNode jsonNode) {
        if (jsonNode == null) {
            return new IntentionNodeConfig();
        }
        return JSONUtil.toObject(jsonNode, IntentionNodeConfig.class);
    }

    public String getInputField() {
        return inputField;
    }

    public void setInputField(String inputField) {
        this.inputField = inputField;
    }

    public String getOutputField() {
        return outputField;
    }

    public void setOutputField(String outputField) {
        this.outputField = outputField;
    }

    public AIIntention[] getIntentions() {
        return intentions;
    }

    public void setIntentions(AIIntention[] intentions) {
        this.intentions = intentions;
    }
}
